namespace Microsoft.VisualStudio.EnterpriseTools.OperationDesigner
{
    using System;
    using System.Drawing;
    using System.Globalization;
    using System.Resources;
    using System.Windows.Forms;

    public sealed class OperationDesignerGlyphs
    {
        public const short CloseParameterIndex = 2;
        public const short DatabaseConsumerPortIndex = 7;
        public const short DatabaseProviderPortIndex = 6;
        private static System.Windows.Forms.ImageList imageList;
        public const short OpenCloseParameterIndex = 0;
        public const short OpenParameterIndex = 1;
        public const short OperationRequest = 9;
        public const short OperationRequestResponse = 8;
        public const short ParameterSeparatorIndex = 3;
        public const short WebServiceConsumerPortIndex = 5;
        public const short WebServiceProviderPortIndex = 4;

        private OperationDesignerGlyphs()
        {
        }

        public static System.Windows.Forms.ImageList ImageList
        {
            get
            {
                if (imageList == null)
                {
                    ResourceManager manager = new ResourceManager("odglyphs", typeof(OperationDesignerGlyphs).Assembly);
                    Bitmap bitmap = (Bitmap) manager.GetObject("odglyphs", CultureInfo.CurrentCulture);
                    Color transparentColor = Color.FromArgb(0xff, 0, 0xff);
                    bitmap.MakeTransparent(transparentColor);
                    imageList = new System.Windows.Forms.ImageList();
                    imageList.TransparentColor = transparentColor;
                    imageList.ImageSize = new Size(bitmap.Height, bitmap.Height);
                    imageList.ColorDepth = ColorDepth.Depth24Bit;
                    imageList.Images.AddStrip(bitmap);
                }
                return imageList;
            }
        }
    }
}

